package com.dronff.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dronff.pojo.Mall;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author tyf
 * @date 2022/7/21 19:16
 */
public interface MallMapper extends BaseMapper<Mall> {
    @Update("UPDATE mall SET count = count - #{number} WHERE id = #{id} AND count > 0")
    Integer decCommodityCount(@Param("id") Integer id,@Param("number")Integer number);
}
